﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using KPIS.GERP.GIMS.MODEL;
using KPIS.GERP.GIMS.DAL;
using KPIS.GERP.GIMS.DALFactory;
using KPIS.DBM;

namespace KPIS.GERP.GIMS.BLL
{
    public class PurchaseOrderCollateralBLL
    {
        private static readonly PurchaseOrderCollateralDAL dal = DataAccess.CreatePurchaseOrderCollateral();

        public PurchaseOrderCollateralBLL()
        {

        }

        public PurchaseOrderCollateralInfo GetPurchaseOrderCollateral(int seq)
        {
            return dal.GetPurchaseOrderCollateral(seq);
        }

        public IList<PurchaseOrderCollateralInfo> GetPurchaseOrderCollateralWithParent(int PoSeq)
        {
            return dal.GetPurchaseOrderCollateralWithParent(PoSeq);
        }

        public void Insert(IList<PurchaseOrderCollateralInfo> infoList, Nullable<int> po_seq, PurchaseOrderInfo info, IDBManager dbManagerTrans)
        {
            dal.Insert(infoList, po_seq, info, dbManagerTrans);
        }

        public void Insert(PurchaseOrderCollateralInfo info)
        {
            dal.Insert(info);
        }

        public void Update(PurchaseOrderCollateralInfo info)
        {
            dal.Update(info);
        }

        public void DeleteAll(IList<PurchaseOrderCollateralInfo> infoList)
        {
            dal.DeleteAll(infoList);
        }
    }
}
